<?php
class Simplium_Db_Adapter_Pdo_Mysql extends Simplium_Db_Adapter_Pdo_Abstract{
	public function __construct(array $options = array()){
		$this->connect($options);
	}

	public function connect(array $options = array()){
		if($this->_connection){
			return;
		}
		
		if(count($options) > 0){
			$this->setOptions($options);
		}elseif(count($this->_options) == 0){
			throw new PDOException('Duhet te vendosni opsionet e duhura!');
		}
		
		if(isset($this->_options['charset'])){
			$initCmd = "SET NAMES '" . $this->_options['charset'] . "'";
			$this->_options['driver_options'][1002] = $initCmd;
		}
		
		parent::connect();
	}
	
	/**
	 * @return string
	 */
	public function getQuoteIdentifierSymbol(){
		return "`";
	}
}